package com.assignwork.dto;

import com.assignwork.entity.TrainStatistics;
import io.swagger.annotations.ApiModel;
import lombok.Data;

import java.util.List;

import org.springblade.core.tool.utils.Func;

/**
 * (TrainStatistics)DTO
 *
 * @since 2024-04-25 14:09:45
 */
@Data
@ApiModel(value = "TrainStatisticsDTO", description = "")
public class TrainStatisticsDTO extends TrainStatistics {

    private List<TrainStatisticsItemDTO> data;

    public List<TrainStatisticsItemDTO> getData() {
        if (Func.isNotEmpty(data)) {
            for (TrainStatisticsItemDTO datum : data) {
                datum.setParentId(getId());
            }
        }
        return data;
    }
}

